<!DOCTYPE html>
<html lang="en">
<head>
    <include file="Public:header2" />
    <script type="text/javascript" src="__PUBLIC__/layer/layer.js"></script>
    <script type="text/javascript" src="__PUBLIC__/Home/js/jquery.cookies.2.2.0.js"></script>
    <script src="__PUBLIC__/Home/js/jquery.copy.js"></script>
    <script src="__PUBLIC__/Home/js/qrcode.js"></script>
</head>
<body class="blackbg">
<div id="container" class="logbg">
	<div class="log_title">
		<span class="back"><a href="javascript:history.go(-1)"></a></span>
		{:L('推荐用户')}
	</div>
	<style type="text/css">
		#codeaa>div{left: 0px!important;top: 0px!important;right: 0px!important;bottom: 0px!important;margin:0 auto!important;background: #fff;}
	</style>
	<div class="logbot">
		<div id="qrcode-wallet" style="display:block;margin:0 auto;margin-top: 15px;" width="100">
			<saon id="codeaa" style="display:block;margin:0 auto;"></saon>
			<p id="qrcode-t" style="font-size:18px;text-align: center;margin-top:15px;color:#ff0000;">{:L('您的推广专属二维码')}</p>
		</div>
		<p style="font-size:18px;line-height:20px;color:#ff8800;margin-top: 15px;">{:L('专属邀请码')}</p>
		<p style="font-size:14px;line-height:20px;color:#ff8800;">{:L('这是您的专用邀请码，您可以分享给朋友，让他们注册帐号时输入您的邀请码：')}</p>
		<textarea style="width:96%;height: 20px;font-size: 14px;padding:5px 2%;font-size: 14px;color:#fff;background: rgba(0,0,0, .5);line-height: 20px;margin-top: 15px;" readonly>{$user['invit']}</textarea>
		<!-- <input type="text" class="logipt" id="invite-input" value="{$user['invit']}"> -->
		<p style="font-size:18px;line-height:20px;color:#ff8800;margin-top: 15px;">{:L('专属链接')}</p>
		<p style="font-size:14px;line-height:20px;color:#ff8800;">{:L('这是您的专用链接，您可以复制，将本文粘贴并发送给您的好友：')}</p>
		<textarea style="width:96%;height: 20px;font-size: 14px;padding:5px 2%;font-size: 14px;color:#fff;background: rgba(0,0,0, .5);line-height: 20px;margin-top: 15px;" id="foo" readonly>{$user_url}</textarea>
		<!-- <input type="text" class="logipt" id="invite-inputa" value="http://{$_SERVER['HTTP_HOST']}/Login/register.html?invit={$user['invit']}" > -->
		
		<!-- <div class="form_btn"> -->
			<button class="logbut" data-clipboard-action="copy" data-clipboard-target="#foo">{:L('复制链接')}</button>
      		<!-- </div> -->

      
      
      
  </div>
</div>
<script type="text/javascript" src="__PUBLIC__/Home/js/jquery.qrcode.min.js"></script>
<script type="text/javascript" >
	$('#codeaa').qrcode({
		render: "table", //table方式
		size:200,
		text: "http://{$_SERVER['HTTP_HOST']}/Login/register.html?invit={$user['invit']}" //任意内容
	}); //任意字符串
</script>
<script type="text/javascript" src="__PUBLIC__/Home/js/ZeroClipboard.min.js"></script>
<script src="__PUBLIC__/Home/js/clipboard.min.js"></script>
<script>
    var clipboard = new Clipboard('.logbut');
    clipboard.on('success', function(e) {
        layer.msg('{:L('复制成功！')}');
        // console.log(e);
    });

    clipboard.on('error', function(e) {
        console.log(e);
    });
</script>
<script>
    var client=new ZeroClipboard(document.getElementById("copy-button"));
    client.on("ready",function(readyEvent){
        client.on("aftercopy",function(event){
            event.target.style.display="none";
        });
    });
    ZeroClipboard.config({swfPath:'__PUBLIC__/Home/js/ZeroClipboard.swf'});
    var clip=new ZeroClipboard(document.getElementById("copy"));
    var _share_title=encodeURI('{:L('邀请好友')}');
    var _share_content=encodeURI("{$C['invit_text_txt']}");
    var _share_url=encodeURIComponent("http://{$_SERVER['HTTP_HOST']}/Login/register.html?invit={$user['id']}");
    var _share_pic='/';
    $(document).ready(function(){
        var clip1=new ZeroClipboard(document.getElementById("copy_button1"));
        var clip2=new ZeroClipboard(document.getElementById("copy_button2"));
        var clip3=new ZeroClipboard(document.getElementById("copy_button3"));
        clip1.on("copy",function(e){
            layer.msg('{:L('复制成功！')}',{icon:1});
        });
        clip2.on("copy",function(e){
            layer.msg('{:L('复制成功！')}',{icon:1});
        });
        clip3.on("copy",function(e){
            layer.msg('{:L('复制成功！')}',{icon:1});
        });
        $(".wlb_tsina").click(function(){
            window.open("http://v.t.sina.com.cn/share/share.php?url="+_share_url+"&title="+_share_content);
        });
        $(".wlb_douban").click(function(){
            window.open("http://www.douban.com/recommend/?url="+_share_url+"&title="+_share_content);
        });
        $(".wlb_qzone").click(function(){
            window.open("http://sns.qzone.qq.com/cgi-bin/qzshare/cgi_qzshare_onekey?url="+_share_url+"&title="+_share_title+"&pics="+_share_pic+"&desc="+_share_content);
        });
    });
</script>
</body>
</html>